//-------------------------------------------------------------------
//	Copyright (c) 2012-2014 Zhirnov Andrey
//	This file is part of the "UXGEN-ES" project.
//	See copyright notice in "Engine.h".
//-------------------------------------------------------------------

#pragma once

#include "Platforms/Base/IApplication.h"

#if defined( PLATFORM_ANDROID )

#include "Platforms/Android/AUtils.h"

namespace Engine
{
namespace Platforms
{

	//
	// Android Sensor Manager
	//

	class AndroidSensorManager
	{
	// types
	public:
		typedef TBitfield< ESensor::_COUNT >	sensors_bits_t;


	// variables
	protected:
		//EngineSubSystemsRef		_subSystems;
		sensors_bits_t			_enabledSensors;
		sensors_bits_t			_supportedSensors;


	// methods
	public:
		AndroidSensorManager () /*: _subSystems(null)*/ {}
		~AndroidSensorManager () {}
		
		bool Init (EngineSubSystemsRef ess, int supportedSensors);
		void Destroy ();

		bool EnableSensor (ESensor::type sensor);
		bool DisableSensor (ESensor::type sensor);
		bool SetSensorUpdateRate (ESensor::type sensor, uint rate);
		bool IsSensorEnabled (ESensor::type sensor) const				{ return _enabledSensors.Get( sensor ); }
		bool HasSensor (ESensor::type sensor) const						{ return _supportedSensors.Get( sensor ); }
	};
	


}	// Platforms
}	// Engine

#endif	// PLATFORM_ANDROID